/**
 * 全局getters
 * 提供对所有模块状态的快捷访问
 */
const getters = {
    // 用户相关
    token: state => state.user.token,
    userId: state => state.user.userId,
    username: state => state.user.username,
    avatar: state => state.user.avatar,
    roles: state => state.user.roles,
    permissions: state => state.user.permissions,
    userInfo: state => state.user.userInfo,

    // 权限相关
    routes: state => state.permission.routes,
    addRoutes: state => state.permission.addRoutes,

    // 应用相关
    sidebar: state => state.app.sidebar,
    size: state => state.app.size,
    device: state => state.app.device,

    // 标签页相关
    visitedViews: state => state.tagsView.visitedViews,
    cachedViews: state => state.tagsView.cachedViews,

    // 设置相关
    theme: state => state.settings.theme,
    showSettings: state => state.settings.showSettings,
    tagsView: state => state.settings.tagsView,
    fixedHeader: state => state.settings.fixedHeader
}

export default getters 